const { mysql } = require('../qcloud')

module.exports = async (ctx, next) => {
  var bookName = ctx.request.body.bookName;
  await mysql('book').select('*').where({ bookName: bookName}).where({ bookStatus : 1 }).then(res => {
    ctx.state.data = res;
  })
}